import request from '@/utils/request'

// 查询物资入库列表
export function listElecMaterialIninfo(query) {
  return request({
    url: '/elec/elecMaterialIninfo/list',
    method: 'get',
    params: query
  })
}

// 查询物资列表
export function listElecMaterial(query) {
  return request({
    url: '/elec/elecMaterial/list',
    method: 'get',
    params: query
  })
}

// 查询照片
export function searchImg(query) {
  return request({
    url: '/elec/elecMaterialIninfo/searchImg',
    method: 'get',
	params: query
  })
}

// 查询用户下拉框
export function listUserOptions(query) {
  return request({
    url: '/bas/basWarehouse/userOptions',
    method: 'get',
    params: query
  })
}

// 查询物资入库详细
export function getElecMaterialIninfo(inId) {
  return request({
    url: '/elec/elecMaterialIninfo/' + inId,
    method: 'get'
  })
}

// 新增物资入库
export function addElecMaterialIninfo(data) {
  return request({
    url: '/elec/elecMaterialIninfo',
    method: 'post',
    data: data
  })
}

// 修改物资入库
export function updateElecMaterialIninfo(data) {
  return request({
    url: '/elec/elecMaterialIninfo',
    method: 'put',
    data: data
  })
}

// 删除物资入库
export function delElecMaterialIninfo(inId) {
  return request({
    url: '/elec/elecMaterialIninfo/' + inId,
    method: 'delete'
  })
}
